package top.jianx.demo.shiro.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.jianx.demo.shiro.mapper.UserMapper;
import top.jianx.demo.shiro.pojo.User;
import top.jianx.demo.shiro.service.UserService;

import java.util.List;

/**
 * @Description
 * @ClassName UserServiceImpl
 * @Author Jianx  <[email]jianx@jianx.top>
 * @date 2020.03.03
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAllUser() {
        return userMapper.findAllUser();
    }

    public User findUser(User realUser) {
        return userMapper.findUser(realUser);
    }

    @Override
    public String delete(Integer id) {
        userMapper.deleteById(id);
        return null;
    }

    @Override
    public String update(User user) {

        return userMapper.updateById(user);
    }
}
